function $(id){
    return typeof id==='string'?document.getElementById(id):id;
}
window.onload=function(){
    var index=0;
    var timer=null;
    //鼠标划过或点击的标签和切换的内容
    var titles=$('notice-tit').getElementsByTagName('li');
    var divs=$('notice-con').getElementsByTagName('div');
    // alert(divs.length);
    if(titles.length!=divs.length){
        return;
    }
    for (var i=0;i < titles.length; i++) {
       titles[i].id=i;
       //划过 onclick 
       titles[i].onmouseover=function(){
        var that=this;
        //清除定时器
        if(timer){
            clearTimeout(timer);
            timer=null;
        }
        timer=setTimeout(function(){
            for(var j=0;j<titles.length;j++){
            titles[j].className='';
            divs[j].style.display='none';
        }
        titles[that.id].className='select'
         // this.className='select';
         divs[that.id].style.display='block';
        },500);
        
           
        }
    }
}